<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .progress{
            background-color: #272425;
            height:25px;
            width:400px;
            border-radius: 15px;
            border: 7px solid #272425;
            margin-bottom: 30px;
        }
        .inner{
            background-color: #409eff;
            height: 25px;
            border-radius: 15px;
            width: 0;
        }
        .progress .inner span{
            position: absolute;
            top:50px;
            left:187px;
        }
        .progress2{
            width:300px;
            height:25px;
            background: #272425;
            border-radius: 15px;
            border: 4px solid #272425;
            margin-bottom: 40px;
        }
        .progress2 .inner{
            border-radius: 15px;
            width:50%;
            height:25px;
            background-color: #409eff;
            line-height: 25px;
            font-size: 15px;
            font-weight: 500;
            color:#000;
            text-align: center;
            
        }
    </style>
</head>
<body>
    <div id="app">
        <div class="progress">
            <div class="inner" :style="{width:rate+'%'}">
                <span > {{rate}}%</span>
            </div>    
        </div>
        <div class="progress2">
                <div class="inner ">
                    <span>50%</span>
                </div>
            </div>
            <button @click="rate =25">设置25%</button>
            <button>设置50%</button>
            <button>设置75%</button>
            <button>设置100%</button>
    </div>

    <script src="../vue.js"></script>
    <script>
        const app = new Vue({
            el:'#app',
            data:{
                rate:40
            },        
        })
    </script>
</body>
</html>